﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace AspDemo.Models
{
    public class ApiResponse
    {
        public ApiCode Code { get; set; }
        public string Message { get; set; }
        public object Data { get; set; }

        public ApiResponse(ApiCode code, string msg, object data)
        {
            Code = code;
            Message = msg;
            Data = data;
        }

        public static object[] NullData => new object[0];
    }

    public enum ApiCode
    {
        Success = 0,
        Error = -1
    }
}
